﻿///检查是否是正的整数或者小数或0
function is_numeric1(obj)
{
    var reg;
    if (/^\d+(\.\d+)?$/.test(obj))
    {
        return true;
    }
    else
    {
        return false;
    }
}

function SendMoney()
{
    var prefix = "ctl00_ContentPlaceHolder1_";
    var currentmoney = document.getElementById(prefix + "hidCurrentMoney");
    var sendmoney = document.getElementById(prefix + "txtSendMoney");
    if (sendmoney.value.length == 0)
    {
        alert('请输入工资额！');
        sendmoney.focus();
        return false;
    }
    if (!is_numeric1(sendmoney.value))
    {
        alert('工资额格式不正确！');
        sendmoney.focus();
        return false;
    }
    if(sendmoney.value=='0')
    {
        alert('工资不能为0');
        sendmoney.focus();
        return false;
    }
    if (sendmoney.value > currentmoney.value)
    {
        alert('工资超过了可用友赢豆，请重新输入');
        sendmoney.focus()
        return false;
    }
    return true;
}
